{% extends 'base.html' %}

{% block title %}

{% endblock %}

{% block article %}
    <section class="main_section">
        <hr>
        <section id="user_manage">
            <nav>
                <p><a href="{%url 'user_detail' %}">个人资料</a></p>
                <p><a href="{%url 'user_bought' %}">我的课程</a></p>
                <p><a href="{% url 'user_cart' %}">购物车</a></p>
            </nav>
            <section class="user_info">
                <div class="user_info_wrapper">
                    <table id="user_shopping_cart" cellpadding="0" cellspacing="0">
                        <tr id="user_shopping_cart_tr_first">
                            <th width="250px">课程名称</th>
                            <th width="100px">价格</th>
                            <th width="200px">上线时间</th>
                            <th width="100px">操作</th>
                        </tr>
                        {%for c in bought %}
                        <tr class="user_info_shopping_tr">
                            <td>{{c.course}}</td>
                            <td style="color:red;">￥{{c.course.price}}</td>
                            <td>{{c.course.createAt}}</td>
                            <td><a href="{%url 'course_buy' c.id %}">立即购买</a></td>
                        </tr>
                        {% endfor %}
                    </table>
                </div>
            </section>
        </section>
    </section>
{% endblock %}
